<template lang="pug">
  div.homepart
    div.mbx
      span.ml24 幼儿测评
      div(@click="$router.push('/childCare/evaluation/psychologicalBehavior')")
        span 测评管理
        img(src="@/assets/right.png")
    s-table(
      ref="table"
      :reqUrl="reqUrl"
      :queryPropsParams="{areaId: curArea.areaId}"
      :column="column"
    )
      template(slot="category" slot-scope="text, scope") {{random() + 1}}
</template>
<script>
import { mapGetters } from 'vuex'
export default {
  data () {
    return {
      reqUrl: 'eapi/statistics/count',
      column: [
        {
          prop: 'className',
          label: '班级'
        },
        {
          prop: 'totalCount',
          label: '总人数'
        },
        {
          prop: 'partakeCount',
          label: '参与人数'
        },
        // {
        //   prop: 'projectName',
        //   label: '测评项目',
        // },
        {
          prop: 'evaluationCount',
          label: '测评次数'
        },
        {
          prop: 'evaluationDay',
          label: '距离上次测评（天）'
        }
      ]
    }
  },
  computed: {
    ...mapGetters(['curArea'])
  },
  methods: {
    random () {
      return Math.ceil(Math.random() * 5)
    }
  }
}
</script>
<style scoped lang="scss">
.homepart{
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  ::v-deep{
    .quikBox {
      padding: 16px 24px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      img{
        width: 32px !important;
        height: 32px !important;
        margin: 0;
      }
      .title{
        margin-left: 24px;
      }
      span{
        margin-left: 24px;
      }
    }
  }
}
</style>
